﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace B.S.Sell.Infacet.Migrations
{
    public partial class w3 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_PurchaseOrderProducter_ProductModeler_ProductModelProductId",
                table: "PurchaseOrderProducter");

            migrationBuilder.DropPrimaryKey(
                name: "PK_ProductModeler",
                table: "ProductModeler");

            migrationBuilder.RenameTable(
                name: "ProductModeler",
                newName: "ProductModel");

            migrationBuilder.AddPrimaryKey(
                name: "PK_ProductModel",
                table: "ProductModel",
                column: "ProductId");

            migrationBuilder.AddForeignKey(
                name: "FK_PurchaseOrderProducter_ProductModel_ProductModelProductId",
                table: "PurchaseOrderProducter",
                column: "ProductModelProductId",
                principalTable: "ProductModel",
                principalColumn: "ProductId");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_PurchaseOrderProducter_ProductModel_ProductModelProductId",
                table: "PurchaseOrderProducter");

            migrationBuilder.DropPrimaryKey(
                name: "PK_ProductModel",
                table: "ProductModel");

            migrationBuilder.RenameTable(
                name: "ProductModel",
                newName: "ProductModeler");

            migrationBuilder.AddPrimaryKey(
                name: "PK_ProductModeler",
                table: "ProductModeler",
                column: "ProductId");

            migrationBuilder.AddForeignKey(
                name: "FK_PurchaseOrderProducter_ProductModeler_ProductModelProductId",
                table: "PurchaseOrderProducter",
                column: "ProductModelProductId",
                principalTable: "ProductModeler",
                principalColumn: "ProductId");
        }
    }
}
